$(document).ready(function() {
	console.log("started...");
	
	bindEvent();
});

var selectedBook = 'book_default';
function bindEvent() {
	// button add new word
	$('#btnAdd').bind('click', doAddNewWordToSelectedBook);
}

function doAddNewWordToSelectedBook() {
	var w = {
		word : $('#txtWord').val(),
		description : $('#txtDescription').val(),
		imagePath : $('#txtImagePath').val()		
	};
	
	if (w.word == '') {
		console.log('Word is empty, adding failed.');
		return;
	}
	
	console.log("OK, lets continue.");
}